home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sun Solutions 1997 April to September
/
Sun Solutions CD - APR '97 - SEP '97 (704-3778-12 Rev. H)(Sun Microsystems, Inc.)(1997).iso
/
products
/
Confluent
/
confluent
/
html
/
note_colormap.txt
< prev
next >
Wrap
Text File
|
1995-10-17
|
7KB
|
191 lines
----------------------------------------------------------------------
Colormap Problems
Last update: 10 September 1995
Confluent Technical Notes
Copyright (c) 1995 Confluent, Inc. All rights reserved.
Suggestions or questions to 415-586-8700 or vthought@confluent.com.
----------------------------------------------------------------------
This technical note describes typical X colormap problems encountered
with Visual Thought and their resolution.
If the X server colormap is not properly configured prior to running
Visual Thought, the following problems can occur:
1. Visual Thought fails to start, usually issuing an "arithmetic
exception" or a "floating exception" message.
2. Visual Thought issues warning messages regarding colormap problems.
3. Colors flash when the window focus changes.
4. Colors are dithered due to insufficient available colors.
5. Window background colors are displayed incorrectly.
These problems can usually be eliminated by quitting all
color-intensive applications (e.g., FrameMaker, Netscape, Visual
Thought, xv, etc.) and executing the following commands:
% xstdcmap -delete default
% xstdcmap -default
If the problems persist, it might be necessary to restart the X server
and the window manager and execute the above commands before starting
any color-intensive applications.
Generally, colormap problems can be avoided by doing either of the
following after the X server and window manager are started:
1. Execute the above xstdcmap commands before starting any
color-intensive applications.
2. Start Visual Thought (or any other application that creates the
RGB_DEFAULT_MAP standard colormap property) before starting other
color-intensive applications.
More information regarding the use of colormaps is provided in the
following sections.
ICCCM Compliance
----------------
Color use by Visual Thought is ICCCM-compliant. Colors are obtained
from the RGB_DEFAULT_MAP standard colormap property on the X server.
This standard colormap is configured as a cube of colorcells with
variations of red, green, and blue components along the three
coordinate directions of the cube. This approach allows all
ICCCM-compliant applications to allocate colorcells from the same
colormap, avoiding excessive allocation and color flashing as the
window focus changes.
ICCCM-compliant Colormap Allocation
-----------------------------------
When Visual Thought starts, it determines whether the RGB_DEFAULT_MAP
standard colormap property already exists for the default visual. If
the standard colormap exists, it is used by Visual Thought.
Otherwise, Visual Thought creates the standard colormap for use by
itself and subsequently started ICCCM-compliant applications.
When Visual Thought creates the RGB_DEFAULT_MAP standard colormap, it
allocates a color cube with the same number of colors along each
direction of the cube. If at least 125 colorcells are available, the
allocated color cube contains 125 colorcells (i.e., 5 red x 5 green x
5 blue, as set up by "xstdcmap -default"). Otherwise, the allocated
color cube is as large as possible, given the number of available
colorcells.
If the size of the RGB_DEFAULT_MAP standard colormap is too small,
there might not be sufficient colors available for display without
dithering.
If the RGB_DEFAULT_MAP standard colormap does not exist and Visual
Thought cannot create it, Visual Thought might fail to start, issue
warning messages, or exhibit color flashing when the window focus
changes.
Colormap Allocation by Non-compliant Applications
-------------------------------------------------
Applications that are not ICCCM-compliant typically allocate colors
upon startup without using standard colormaps.
If a standard colormap exists, colors may be used from the standard
colormap or allocated outside the standard colormap. The colorcells
in the standard colormap will remain available to all ICCCM-compliant
applications.
However, if a standard colormap does not exist, the non-compliant
application may allocate many of the available colorcells. There
might be so few remaining available colorcells that a subsequently
started ICCCM-compliant application would fail to allocate a standard
colormap or only be able to allocate one with very few colors.
Determining the Standard Colormap Properties
--------------------------------------------
The properties of the RGB_DEFAULT_MAP standard colormap can be
determined with the following command:
xprop -root RGB_DEFAULT_MAP
If the standard colormap property is defined on the X server, the
output should look something like the following:
RGB_DEFAULT_MAP(RGB_COLOR_MAP):
colormap id #: 0x80074
red-max: 4
red-mult: 1
green-max: 4
green-mult: 25
blue-max: 4
blue-mult: 5
base-pixel: 20
The red-max, green-max, and blue-max values indicate the maximum color
indices along the three directions of the color cube. The indices
start at 0, so the above output indicates that the color cube has 5
colors along each direction. If the *-max values are not all the
same, Visual Thought will issue a warning message and might display
window background colors incorrectly (they should be light gray).
HP-UX
-----
When the HP-UX X server starts, it creates the RGB_DEFAULT_MAP
standard colormap with the following properties:
red-max: 7
green-max: 7
blue-max: 3
This standard colormap has unequal *-max values. If it is present
when Visual Thought starts, Visual Thought will issue a warning
message and might display window background colors incorrectly (they
should be light gray).
This problem can be eliminated by executing the following commands:
% xstdcmap -delete default
% xstdcmap -default
The xstdcmap program is not distributed with HP-UX. If you do not
already have xstdcmap on your system, a copy is provided in the
following Confluent directory (assuming Visual Thought has been
installed in /usr/local/confluent):
/usr/local/confluent/util-1.2/hpux-9/bin
FrameMaker
----------
FrameMaker 4.0 does not use standard colormaps. Before starting
FrameMaker 4.0, the RGB_DEFAULT_MAP standard colormap should be
created with xstdcmap or by starting Visual Thought.
FrameMaker 5.0 uses standard colormaps. However, the default standard
colormap is named _FRAME_COLORCUBE, not RGB_DEFAULT_MAP. If the
default standard colormap is used, it will not be shared with other
ICCCM-compliant applications. To cause FrameMaker to use the
RGB_DEFAULT_MAP standard colormap and share it with other
applications, set the following FrameMaker resource:
Maker.standardColorCubeName: RGB_DEFAULT_MAP
See the FrameMaker online manual "Changing Setup Files" for
instructions on setting FrameMaker resources.
Netscape Navigator
------------------
The Netscape Navigator 1.1N does not use standard colormaps. By
default, it tends to allocate all available colors. Before starting
Netscape 1.1N, the RGB_DEFAULT_MAP standard colormap should be created
with xstdcmap or by starting Visual Thought.
We have found that Netscape is the most frequent cause of color map
conflicts with other applications such as Visual Thought.